<?php
// Si le fichier de qui dÔøΩfinie les constantes n'a pas encore ÔøΩtÔøΩ appelÔøΩ on le charge
if (!defined('CONFIGURATION_FILE_LOADED'))
    include( $_SERVER['DOCUMENT_ROOT'] . '/LeSonDesChefs/includes/configuration_include.php');

		
include( PATH_VIEWS.'sphere_view.php');
include( PATH_MODELS.'sphere_model.php');

$strs = printMessage();
$bdd = model_db_connexion();
$req = select_playlist($bdd);
 startSphere();
while ($donnees =  $req->fetch( PDO::FETCH_ASSOC)) {
    $playlist_type = $donnees['playlist_type'];
    $playlist_name = $donnees['playlist_name'];;
    $id_playlist = $donnees['id_playlist'];
   
    if ($playlist_type == 1) {
        printPlaylist('one', $playlist_name, $id_playlist);
    }
    if ($playlist_type == 2) {
         printPlaylist('two', $playlist_name, $id_playlist);
    }
    if ($playlist_type == 3) {
         printPlaylist('three', $playlist_name, $id_playlist);
    }
    if ($playlist_type == 4) {
         printPlaylist('four', $playlist_name, $id_playlist);
    }
    if ($playlist_type == 5) {
         printPlaylist('five', $playlist_name, $id_playlist);
    }
    if ($playlist_type == 6) {
         printPlaylist('six', $playlist_name, $id_playlist);
    }
    
}
endSphere();

?>



<?php
echo $str . "\n";
echo '  <script src="http://code.jquery.com/jquery-latest.js"></script>
		<script type="text/javascript" src="' . URL_JS . 'sphere.js"></script>
                <script type="text/javascript" src="' . URL_JS . 'view_control.js"></script>';
?>